public class Main {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode ret = binaryTree.createTree();
        System.out.println("=====");
        binaryTree.preOrder(ret);
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.nodeSize(root);
        System.out.println("节点的个数:"+binaryTree.size);
        binaryTree.getLeafSize(root);
        System.out.println("叶子节点的个数："+binaryTree.leafSize);
        System.out.println("第k层的叶子节点数为："+binaryTree.getKLevelNodeCount(root,3));
    }
}